<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'hvac-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'roomId'); ?>
		<?php echo $form->dropDownList(
			$model,
			'roomId',
			CHtml::listData(Room::model()->findAll(), '_id', 'name')
		); ?>
		<?php echo $form->error($model,'roomId'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'typeId'); ?>
		<?php echo $form->dropDownList($model, 'typeId', $model->typeList); ?>
		<?php echo $form->error($model,'typeId'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'host'); ?>
		<?php echo $form->textField($model,'host'); ?>
		<?php echo $form->error($model,'host'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'channel'); ?>
		<?php echo $form->textField($model,'channel'); ?>
		<?php echo $form->error($model,'channel'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'hasRange'); ?>
		<?php echo $form->checkBox($model,'hasRange'); ?>
		<?php echo $form->error($model,'hasRange'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'minValue'); ?>
		<?php echo $form->textField($model,'minValue'); ?>
		<?php echo $form->error($model,'minValue'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'maxValue'); ?>
		<?php echo $form->textField($model,'maxValue'); ?>
		<?php echo $form->error($model,'maxValue'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->